From: Florian Müllner Date: Tue, 6 Feb 2024 17:10:50 +0000 (+0100) Subject: messageTray: Don't call _createPolicy() unconditionally X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~17 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ebec609207b84b3334b6ce01ccc97df8b579c6b6;p=gnome-shell.git messageTray: Don't call _createPolicy() unconditionally Since commit 932ccac1c27, the Source constructor takes a properties object instead of individual arguments. That means that the policy may now be set through a construct property, and we shouldn't override it if that was the case. Part-of: --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 2d21e98f4..d5cdf686e 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -614,7 +614,8 @@ export const Source = GObject.registerClass({ this.notifications = []; - this._policy = this._createPolicy(); + if (!this._policy) + this._policy = this._createPolicy(); } get policy() {